import request from '@/utils/request';

/**
 * 根据性别查询所有一级标签
 * @param {Number} sex
 * @return {Object}
 */
export function getBaseInfo(sex) {
  return request({
    url: '/txs/clerk/baseinfo/' + sex,
    method: 'get',
  });
}

/**
 * 修改一级标签
 * @param {Object} data
 * @return {void}
 */
export function putBaseInfo(data) {
  return request({
    url: '/txs/clerk/baseinfo',
    method: 'put',
    data,
  });
}

/**
 * 上传图片
 * @param {FormData} data
 * @return {void}
 */
export function upload(data) {
  return request({
    url: '/txs/common/upload',
    method: 'post',
    data,
  });
}

/**
 * 查询基础方案
 * @return {Object}
 * @deprecated
 */
export function getBaseFangan() {
  return request({
    url: '/txs/base/fangan',
    method: 'get',
  });
}

/**
 * 添加基础方案
 * @param {Object} data
 * @return {void}
 * @deprecated
 */
export function addBaseFangan(data) {
  return request({
    url: '/txs/base/fangan',
    method: 'post',
    data,
  });
}

/**
 * 根据ID删除基础方案
 * @param {Number} id
 * @return {void}
 * @deprecated
 */
export function delBaseFangan(id) {
  return request({
    url: '/txs/base/fangan/' + id,
    method: 'delete',
  });
}
